package xiangmu1;
public class Car1 {
    //静态变量的使用和创建一维数组
    static Jcar jcar[]=new Jcar[5];//创建轿车数组
    static Pcar[] pcar=new Pcar[5];//创建客车数组
    static {
        jcar[0]=new Jcar("宝马X6（京NY28588）",800.0);
        jcar[1]=new Jcar("宝马550i（京CNY3284）",600.0);
        jcar[2]=new Jcar("别克林荫大道（京NT37465）",300.0);
        jcar[3]=new Jcar("别克GL8（京NT96968）",600.0);
        jcar[4]=new Jcar(null,0.0);}
        static {
            pcar[0]=new Pcar("金杯，16座（京6566754）",800.0);
            pcar[1]=new Pcar("金杯，16座（京8696997）",800.0);
            pcar[2]=new Pcar("金杯，34座（京9696996）",1500.0);
            pcar[3]=new Pcar("金杯，34座（京8696998）",1500.0);
            pcar[4]=new Pcar(null,0.0);
        }
    }


